def count_words(filename):
    with open(filename,"r") as f:
        content = f.read()
        words = content.split()
        return len(words)